home *** CD-ROM | disk | FTP | other *** search
Text File | 1991-07-05 | 108.4 KB | 3,103 lines |
-
-
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL
- _______
- ____|__ | (R)
- --| | |-------------------
- | ____|__ | Association of
- | | |_| Shareware
- |__| o | Professionals
- -----| | |---------------------
- |___|___| MEMBER
-
- PLEASE READ THIS LICENSE AGREEMENT AND DISCLAIMER BEFORE USING
- OAK HILL VI SHAREWARE. USING THE PROGRAM CONSTITUTES YOUR
- ACCEPTANCE OF THE TERMS OF THIS AGREEMENT AND THE ACCOMPANYING
- DISCLAIMER.
- LICENSE AGREEMENT
-
- 1. SHAREWARE: This is shareware. You may try this software and
- manual free of charge for thirty days. If you continue to use the
- software beyond thirty days, you must register with Oak Hill
- software. The registration fee is $60. In return for this fee you
- will receive the latest version of the software on disk, a type-set-
- quality printed manual, a registration number, and support by mail.
-
- 2. COPYING: Whether you decide to keep the software or not, you
- may copy the shareware archive file "VI57A1" containing the
- programs, manual, and other files and pass it along to others
- subject to the following restriction: THE ENTIRE SHAREWARE ARCHIVE
- FILE MUST BE COPIED WITHOUT MODIFICATION INCLUDING ALL CONTAINED
- FILES, COPYRIGHT, LICENSE, AND LEGAL NOTATIONS. The VI57A1 file
- may appear with extension ".ZIP" or ".EXE" or some other extension
- depending on the archiving method, which may differ depending on
- vendor or BBS sysop preferences.
-
- 3. CHARGING FEES: No one other than Oak Hill Software may charge
- any fee for the distribution of Oak Hill Vi (TM) without first
- obtaining authorization from Oak Hill Software Inc at 73 Hillyer
- Circle, Middletown, NJ, 07748, 908-671-8544. This authorization is
- automatically granted to distributors recognized by the (ASP) as
- adhering to its guidelines for shareware distributors, and such
- distributors may begin offering Oak Hill Vi immediately.
-
- 4. COMMERCIAL USERS: Commercial users of Oak Hill Vi (TM) must
- register and pay for their copies of Oak Hill Vi within 30 days of
- first use or their license is withdrawn. Site-License arrangements
- may be made by contacting Oak Hill Software.
-
- DISCLAIMER
-
- THIS SOFTWARE AND ITS ACCOMPANYING REFERENCE MATERIAL ARE
- DISTRIBUTED "AS IS", WITHOUT WARRANTY AS TO THEIR PERFORMANCE,
- MERCHANTABILITY, OR FITNESS FOR ANY PARTICULAR PURPOSE. THE ENTIRE
- RISK AS TO THE RESULTS AND PERFORMANCE OF THE PROGRAM IS ASSUMED BY
- THE USER.
-
- NEITHER OAK HILL SOFTWARE, NOR ANYONE WHO SUPPLIES COPIES OF THE
- OAK HILL VI SOFTWARE OR MANUAL, SHALL BE LIABLE FOR INDIRECT,
- SPECIAL, OR CONSEQUENTIAL DAMAGES RESULTING FROM THE USE OF THE
- PROGRAM OR MANUAL.
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 2
-
-
-
- OAK HILL VI SHAREWARE REGISTRATION FORM
-
- REMINDER: THIS IS SHAREWARE. IT IS NOT FREE. If you continue to
- use the software beyond your 30-day free-trial period, you must
- register. If you register you will receive the latest version of
- the program on disk, a type-set-quality printed manual, and a
- registration number that allows you to receive support-by-mail.
-
- To register, please fill out this form and mail it with check or
- money order for $60 to Oak Hill Software at the address below.
- Please do not send cash.
-
- NAME:__________________________________________________________
-
- COMPANY:_______________________________________________________
-
- ADDRESS:_______________________________________________________
-
- CITY, STATE, ZIP:______________________________________________
-
- PROGRAM OBTAINED FROM:_________________________________________
-
- COMPUTER BRAND & MODEL:________________________________________
-
- DISK SIZE PREFERRED (5-1/4 or 3-1/2):___________________________
-
- WHERE YOU HEARD ABOUT OAK HILL VI:_____________________________
-
- TODAY'S DATE: _________________________________________________
-
-
- (5.7 91-05-25) Oak Hill Software
- 73 Hillyer Circle
- Middletown, NJ 07748
- 908-671-8544
-
- COMMENTS OR QUESTIONS:_____________________________________________
-
- ___________________________________________________________________
-
- ___________________________________________________________________
-
- ___________________________________________________________________
-
- ___________________________________________________________________
-
- ___________________________________________________________________
-
- ___________________________________________________________________
-
- ___________________________________________________________________
-
-
-
-
-
-
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 3
-
-
-
- CONTENTS
-
- ====================================================================
-
- 1.0 INTRODUCTION .............................................. 4
- 1.1 GETTING STARTED ....................................... 6
- 1.2 STANDARD AND COMPACT MODELS OF OAK HILL VI............. 6
- 1.3 FILE NAMING AND EDITING MULTIPLE FILES ................ 8
- 1.4 SPECIAL FEATURES FOR LAPTOP PORTABLES ................. 8
- 1.5 BUGS AND NEW FEATURES ................................. 9
-
- 2.0 COMMAND SUMMARY ........................................... 10
- 2.1 MOVING AROUND IN YOUR FILE ............................ 10
- 2.2 FINDING TEXT PATTERNS ................................. 13
- 2.3 INSERTING AND APPENDING TEXT .......................... 14
- 2.4 DELETING TEXT ......................................... 14
- 2.5 CHANGING TEXT ......................................... 15
- 2.6 YANKING (COPYING) TEXT INTO YANK/DELETE BUFFER ........ 17
- 2.7 OTHER TEXT MODIFICATION COMMANDS ...................... 18
- 2.8 WRITING, READING AND EXITING COMMANDS ................. 22
- 2.9 OPTION-SETTING AND OTHER COMMANDS ..................... 25
- 2.10 IBM EDIT KEYS ........................................ 30
-
- 3.0 LINE RANGE SPECIFICATION .................................. 31
-
- 4.0 TEXT FILL AND CENTERING FEATURES .......................... 32
- 4.1 TEXT FILL FEATURE ..................................... 32
- 4.2 TEXT CENTERING FEATURE................................. 34
-
- 5.0 SETUP FILE "VISETUP.VI" ................................... 35
-
- 6.0 MEMORY AND FILE SIZE CONSIDERATIONS ....................... 36
-
- 7.0 "SLICE" UTILITY PROGRAM ................................... 38
-
- 8.0 "PAGE" TEXT PROCESSING PROGRAM ............................ 40
-
- 9.0 OAK HILL Vi (TM) AND UNIX (TM ) Vi ........................ 42
-
- 10.0 MISCELLANEOUS INFORMATION ................................ 42
-
- 11.0 COMMAND INDEX AND QUICK REFERENCE ........................ 44
-
- ====================================================================
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 4
-
-
-
- 1.0 INTRODUCTION
- ======================================================================
- Thank you for trying Oak Hill Vi (TM). This reference document
- introduces the program and lists the commands available on the
- current version.
-
- Oak Hill Vi (TM) is designed to work on the IBM PC/XT/AT, IBM PS/2,
- and virtually all IBM Compatibles. (See following section for some
- possible exceptions.)
-
- Oak Hill Vi (TM) provides a large subset of the the standard UNIX
- (UNIX is a trademark of AT&T) vi editor capabilities, and within
- that subset attempts to mimic the command syntax and operation of
- the UNIX vi editor as closely as possible. It also provides
- paragraph formatting, line centering, and case conversion features
- not found in standard UNIX vi.
-
- If you do not already know how to use a vi editor, a good way to
- learn is to work through the commands on a practice file. Don't be
- intimidated by the long list of commands -- no one uses all of
- them, and many are just synonyms for other commands. If you are
- uncertain which commands to learn first, we recommend that you
- start with those that marked with an arrow "->" in the margin.
- While editing preferences vary from person to person, these are
- among the most commonly used vi commands. Whether you are a
- beginner or an advanced user, you should find the Command Index
- and Quick Reference in Section 10 to be useful.
-
- Beginners who would like a formal tutorial should consult standard
- UNIX literature and primers on vi. One good source is "Editing
- in a UNIX Environment -- The vi/ex Editor", by Mohammed el Lozy,
- Prentice Hall, 1985.
-
-
- REMINDER: THIS IS SHAREWARE. IT IS NOT FREE. If you continue to
- use the software beyond your 30-day free-trial period, you must
- register. If you register you will receive the latest version of
- the program on disk (with no shareware reminder notices or pauses),
- a type-set-quality printed manual, and a registration number that
- allows you to receive support-by-mail. See the registration form
- above.
-
- Whether or not you continue to use the software (and therefore
- register), you are free to pass along the shareware archive file
- VI57A1.XXX to others or to upload it to any bulletin board system
- (BBS). Note that the ".XXX" extension may be ".ZIP" or ".EXE" or
- some other extension depending on the archiving method preferences
- of vendors or BBS sysops. Note also that you may pass along ONLY
- the original unmodified VI57A1 file. If you do not have that file,
- you may download it from the CompuServe IBMAPP Forum, Text Editor
- section. It is the intention of Oak Hill Software to keep an
- updated shareware "ZIP" file in that location.
-
- A Commercial shrink-wrap version of Oak Hill Vi (TM), called
- "Personal Vi" is available in a standard shrink-wrap software
- binder from Advantage Software, 1-800-333-3141, or Personalized
- Software, 515-472-6330, Master Card & Visa accepted. Corporate
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 5
-
-
- purchasers may call Corsoft at 908-389-1700. Or you may call Oak
- Hill Software directly at 908-671-8544.
-
- INTRO-SCREEN PAUSE DEFEAT: Aside from a shareware-specific
- greeting message that appears when you first load Oak Hill Vi (TM),
- this shareware version of the software is identical to the
- Registered and Commercial versions. After the greeting is
- displayed you are prompted for a carriage return to continue the
- program. If you find it annoying to have to press the return key,
- the command ":set nopress" may be added to your VISETUP.VI file to
- remove the need for the carriage return (see Sections 5.0 and 2.9).
- Thereafter, the greeting message will appear only while your text
- files are being read into memory.
-
- NOTICE: Oak Hill Software, Inc. is a member of the Association of
- Shareware Professionals (ASP). ASP wants to make sure that the
- shareware principle works for you. If you are unable to resolve a
- shareware-related problem with an ASP member by contacting the
- member directly, ASP may be able to help. The ASP Ombudsman can
- help you resolve a dispute or problem with an ASP member, but does
- not provide technical support for members' products. Please write
- to the ASP Ombudsman at 545 Grover Road, Muskegon MI 49442-9427or
- send a CompuServe message via easyplex to ASP Ombudsman 70007,3536
-
- Oak Hill Software, Inc.
- 73 Hillyer Circle
- Middletown, NJ 07748
- 908-671-8544
-
- _______
- ____|__ | (R)
- --| | |-------------------
- | ____|__ | Association of
- | | |_| Shareware
- |__| o | Professionals
- -----| | |---------------------
- |___|___| MEMBER
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 6
-
-
- 1.1 GETTING STARTED
- --------------------------------------------------------------
- To get started, simply copy the shareware file VI57A1.ZIP to a
- convenient directory and use an unzipping program (such as PKUNZIP)
- to extract the files listed in the table below. If you have the
- self-extracting shareware file VI57A1.EXE, you need only execute
- this file to extract the files listed below. If VI57A1 appears
- with some other extension, follow the instructions of the BBS sysop
- or vendor from whom you obtained the file.
-
- FILE PURPOSE
- -----------------------------------------------------------
- VIMANUAL.DOC This manual text file
-
- VI_STD.EXE Oak Hill Vi Standard Model (Video-RAM version)
- VI_CMP.EXE Oak Hill Vi Compact Model (ANSI.SYS version)
-
- VISETUP.VI Sample IBM/Compatible Setup File
-
- SLICE.EXE A utility program to help view and "slice up"
- large files (Section 6)
- PAGE.EXE A utility program to produce "paged"
- output for simple word processing (Section 7)
- CR_CRLF.EXE A utility program to convert non-standard
- text files to standard DOS ASCII files
- TRANS.PVI Sample character translation table for use
- with PAGE.EXE
-
- VIREADME.DOC File containing latest Oak Hill Vi information
- VENDOR.DOC File with information for software distributors
- SYSOPBBS.DOC File with information for BBS Sysops
- PACKING.LST File with list of files included in VI57A1
-
- REGISTER.DOC File with form and information on registering
-
- For IBM and most compatible computers, simply copy VI_STD.EXE into
- your working directory or "BIN" directory and give it a convenient
- name such as VI.EXE. We recommend that you also copy the sample
- VISETUP.VI file provided, although it is not required.
-
- For example, for an IBM PC/XT/AT, PS/2 or compatible, assuming
- the expanded files are on a disk in drive A and your hard disk
- is drive C, the commands would be
-
- COPY A:VI_STD.EXE C:\BIN\VI.EXE
- COPY A:VISETUP.VI C:\BIN\VISETUP.VI
-
- To edit a file called "foo", simply issue the command "VI FOO".
-
- If you have difficulty making VI_STD.EXE work, it could be that
- your computer is a (now-rare) machine that is not video-RAM
- compatible with the IBM. In that case, try the VI_CMP.EXE version
- as outlined below. This version uses the ANSI.SYS driver and
- should work with any machine ever advertised as "IBM Compatible".
- If you have continued difficulty, please contact Oak Hill Software.
-
-
- 1.2 STANDARD AND COMPACT MODELS OF OAK HILL VI
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 7
-
-
- ---------------------------------------------------------------------
- In most cases you should use the Standard Model of Oak Hill Vi
- (TM), VI_STD.EXE. The Standard Model produces fast screen updates
- and allows you to edit large files (up to 250,000 characters).
- However, in some situations, you may prefer the Compact Model, as
- described below.
-
- The Compact Model, VI_CMP.EXE, contains all the commands and
- features of the Standard Model, while occupying 35% to 40% less
- disk space. This can be an advantage if disk space is at a
- premium, as it is in some laptop computers with RAM disks. The
- Compact Model may also be the appropriate choice if you plan to use
- Oak Hill Vi (TM) in conjunction with Terminate-and-Stay-Resident
- programs (see Section 6.0). Furthermore, the Compact Model should
- work with any computer that is advertised as "IBM-Compatible",
- including older machines that may not be 100% compatible with the
- IBM video RAM.
-
- The disadvantages of the Compact Model are that (1) it cannot edit
- files as large as those for the Standard Model, (2) it produces
- slower screen updates than the Standard Model, and (3) it takes
- longer to load and execute than the Standard Model.
-
- To use the Compact Model, you MUST have the line
-
- DEVICE=ANSI.SYS
-
- in a CONFIG.SYS file in the root directory of the MS-DOS disk you
- use to boot your system. Likewise, the driver ANSI.SYS, supplied
- with your DOS disk, must be in that same directory.
-
- A simple way to add the required line to CONFIG.SYS is to enter the
- root directory on the disk that you use to boot your system and
- enter the following:
-
- type con >> config.sys
- device=ansi.sys
- ctl-z
-
- (The last line is a single "control-Z" character). This will append
- the necessary line to an existing CONFIG.SYS file (or create a
- CONFIG.SYS file if one does not exist).
-
- Oak Hill Vi (TM) does all editing on buffers stored in a core
- memory "heap". Except when reading and writing files, or when
- using external filters via the '!' command, the program does not
- access disk storage. This has the advantage of making the program
- very fast, as well as reducing the power consumption and noise
- level in battery-powered lap-top portable computers with floppy
- disk drives. It has the disadvantage of limiting the maximum-size
- file you can edit.
-
- The maximum file sizes that can be edited with the two models are
- as follows --
-
- Approximate Available
- Max File Size Machine Memory
- ---------------------------------------------------------
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 8
-
-
- Standard Model 250,000 characters 640K bytes
- Compact Model 35,000 characters 140K bytes
-
- The two Models are identical except for the maximum amount of
- memory "heap" that each program can manage for buffer storage of
- the file you are editing. Because the Compact Model addresses
- memory with 16-bit pointers, it can address no more than 64K of
- heap. This makes the program more compact to store than on the
- Standard Model. The Standard Model uses 32-bit pointers to address
- memory, making it larger to store. The Compact Model saves still
- more space by using a special encoding algorithm to reduce the size
- of the .EXE file. It takes slightly longer to load because it must
- first "expand" itself to a normal .EXE file.
-
- The Standard Model requests memory from DOS only as it is needed to
- accommodate your file. You do not need 640K to run the Standard Model
- unless you are editing very large files! The Compact Model requests
- 64K of memory as soon as it is loaded.
-
- For extended editing on a very large file, it is good practice with
- any editor to cut the file into smaller segments. Public-domain
- "SPLIT" utilities or the "SLICE" utility provided with Oak Hill Vi
- (TM) helps you do that. See Section 7.
-
-
- 1.3 FILE NAMING AND EDITING MULTIPLE FILES
- ---------------------------------------------------------------------
- When you issue the command "VI FILENAME", you may use DOS file name
- conventions, including the use of "wildcard" characters like '*'
- and '?'. If more than one file is implied, as it might be in "VI
- *.C" you may edit each of these in turn using the ":n<cr>" command.
-
- You may also list more than one file name. Up to 20 files can be
- placed in the editing queue.
-
-
- 1.4 SPECIAL FEATURES FOR LAPTOP PORTABLES
- ---------------------------------------------------------------------
- If you are using Oak Hill Vi (TM) on a laptop portable, you should
- make special note of two user-requested features that have proven
- very popular.
-
- First, the ":set nobeep" option allows you to replace the usual vi
- audible beep tone with a highlighted "BEEP!" flag at the bottom of
- your screen. This makes it easier to use your laptop on an
- airplane where the beep may be difficult to hear, or in a meeting
- room where an audible beep would disturb others in the room.
-
- Second, on some laptops that use non-backlit LCD displays (like the
- original Toshiba 1000), it can be difficult to find the flashing
- underscore cursor on the screen, especially when the ambient
- lighting is poor. The ":set cursor = box" option allows you to
- substitute a flashing box cursor for the underscore -- this is much
- easier to find.
-
- If you find yourself making frequent use of these or other options,
- don't forget to install the commands in a VISETUP.VI file so that
- they will be automatically invoked every time you start Oak Hill
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 9
-
-
- Vi (TM). See Section 5.0.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 10
-
-
- 1.5 BUGS AND NEW FEATURES
- ---------------------------------------------------------------------
- If you find a bug in the program or you would like to see a feature
- added to the program, please let us know by mail. Please supply as
- much information about bugs as you can. (It cannot be investigated
- here if we can't recreate it!) If you are among the first three
- users to find a bug that is corrected in a later version, or among
- the first three to make a suggestion that is incorporated in a
- later version, you will receive a free copy of the revised version.
-
- Oak Hill Software
- 73 Hillyer Circle
- Middletown, NJ 07748
- 908-671-8544
-
- _______
- ____|__ | (R)
- --| | |-------------------
- | ____|__ | Association of
- | | |_| Shareware
- |__| o | Professionals
- -----| | |---------------------
- |___|___| MEMBER
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 11
-
-
- 2.0 COMMAND SUMMARY
- ======================================================================
- In the list below, many of the commands may be preceded by an
- optional repetition number. To do so is the equivalent of entering
- the command n times. For example, the command "4h" will move the
- cursor left four characters instead of just one. The syntax
- of these commands is illustrated in each case with the example
- of n=4.
-
- <ctl-X> indicates that the control key is to be held down at the
- ^X same time the indicated character X is depressed. An
- alternative way of showing this is with the notation ^X.
-
- <cr> denotes a carriage return.
-
- <sp> denotes a space
-
- <esc> denotes an escape character
-
- Items enclosed in [] brackets are optional.
-
- A "white" or "white space" character is a space or tab character.
-
- -> Commands that are marked with an arrow "->" in the left margin are
- the most commonly used vi commands. If you are a beginner, we
- recommend that you practice these commands first.
-
- 2.1 MOVING AROUND IN YOUR FILE
- ----------------------------------------------------------------------
- -> h 4h Move cursor left 1 or 4 characters on current line
- -> l 4l Move cursor right 1 or 4 characters on current line
- -> k 4k Move cursor up 1 or 4 lines in current column
- -> j 4j Move cursor down 1 or 4 lines in current column
-
- -> 0 Move cursor to first character in current line
- -> $ Move cursor to last character in current line
-
- | 4| Move cursor to char closest to 1st or 4th column
-
- Note: In the commands below: a "word" is a
- string of characters separated by white space
- or by punctuation marks. A "WORD" is a string
- of characters separated by white space.
-
- -> w 4w Move ahead 1 or 4 words
- -> W 4W Move ahead 1 or 4 WORDS
-
- -> b 4b Move back 1 or 4 words
- -> B 4B Move back 1 or 4 WORDS
-
- -> e 4e Move ahead to 1st or 4th end-of-word character
- -> E 4E Move to end of 1st or 4th end-of-WORD character
-
- -> <ctl-D> 12<ctl-D>
- Scroll down lines
- -> <ctl-U> 12<ctl-U>
- Scroll up lines
- The default number of lines scrolled is 8.
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 12
-
-
- If an integer, for example 12, precedes
- the command, the number of lines scrolled
- will be 12 and the default thereafter will
- be 12. In the current version, the integer
- can be no larger than larger than half
- the screen size in lines. If a larger
- value of n is specified, it will be reduced
- to half the screen size.
-
- -> <ctl-F> 4<ctl-F>
- Jump ahead 1 or 4 screenfulls (when jumping 1
- screenfull, retain 2 lines for continuity)
- -> <ctl-B> 4<ctl-B>
- Jump back 1 or 4 screenfulls (when jumping 1
- screenfull, retain 2 lines for continuity)
-
- -> G Jump ahead to end of file
- nG Jump directly to line number n
-
- -> 'x Jump to start of line marked "x" (see "m" command)
- `x Like 'x but also jumps to marked cursor location
-
- '' Jump to start of line that cursor was on before last
- "big move" (more than a screenfull away)
- `` Like '' but also jumps to marked cursor location
- within the line
-
- - 4- Move up 1 or 4 lines to 1st non-white char in line
- + 4+ Move down 1 or 4 lines to first non-white character
-
- ^ Move to first non-white character in current line
-
- <cr> 4<cr> Move down 1 or 4 lines to 1st non-white char in line
-
- <sp> 4<sp> Move right 1 or 4 chars on current line (same as "4l")
-
- Note: In the commands below:
- A "word" is a string of letters separated by
- white space or by punctuation marks.
- A "WORD" is a string of letters separated by
- white space.
-
- ) 4) Move ahead 1 or 4 sentences
- ( 4( Move back 1 or 4 sentences
-
- Note: A '.' followed by two spaces or a '.' as the
- last non-white character on a line is
- interpreted as the end of a sentence. This
- search command does not wrap around the
- beginning or end of the file.
-
- } 4} Move ahead 1 or 4 paragraphs
- { 4{ Move back 1 or 4 paragraphs
-
- Note: A paragraph is a section of text
- delimited by blank lines, the start or
- end of a file, lines that begin with a
- space or any of the characters: .-_=*
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 13
-
-
- or a <ctl-X>.
-
- <ctl-E> 4<ctl-E>
- Scroll down 1 or 4 lines, keeping current
- cursor position if possible
- <ctl-Y> 4<ctl-Y>
- Scroll up 1 or 4 lines, keeping current cursor
- position if possible
-
- H Jump to first line on screen
- M Jump to middle line on screen
- L Jump to last line on screen
-
- z<cr> Redraw screen with current line at top of screen.
- z.<cr> Redraw screen with current line at middle of screen.
- z-<cr> Redraw screen with current line at bottom of screen.
- If an integer, for example 6, precedes any
- of the three 'z' commands above, any of
- the three commands above, the screen will
- be drawn about line <n> rather than
- the current line.
- '?', the search direction will be reversed.
-
- % Starting from either a ( or { character, jump
- forward to the matching ) or }. Starting
- from ) or } jump back to the matching ( or {.
- Any of the characters (){} that are within
- quotation marks are ignored.
-
- :[range]p<cr> Print command. Prints all lines in
- specified range.
-
- EXAMPLES:
- :g/string/p<cr> prints all lines that
- contain "string"
- :.,$p<cr> prints all lines from cursor
- to end of file
-
- :spec1<cr> Cursor moves to line number "spec1". See "LINE RANGE"
- (Section 3) below for a description of what
- "spec1" may be.
-
- EXAMPLES:
- :35<cr> jump to line 35
- :$-44<cr> jump to 44th line
- above last line
-
- Note: This is one of a series of "ex" commands
- that are available in UNIX vi through the
- colon ":" commands. This particular command
- has limited usefulness. The first example above
- is equivalent to the vi command "35G", which
- is quicker to type. The second command does
- have some value since it is slightly simpler
- than the vi equivalent "G44k".
-
-
-
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 14
-
-
- 2.2 FINDING TEXT PATTERNS
- ----------------------------------------------------------------------
- -> /pattern/<cr> Jump to next occurrence of string "pattern"
- -> ?pattern?<cr> Jump to previous occurrence of string "pattern"
- (If, before you hit the <cr>, your wish
- to cancel the pattern search, you can
- backspace over the '?' or '/' character
- and the cursor will return to the text.
- The trailing '/' or '?' after 'pattern'
- is optional.)
- -> /<cr> Jump to next occurrence of last requested "pattern"
- -> ?<cr> Jump to previous occurrence of last requested "pattern"
-
- In "pattern" allowable meta characters are:
-
- . matches any character
- ^ matches the beginning of a line
- $ matches the end of line
-
- x* matches zero or more consecutive characters 'x'
- .* matches zero or more occurrences of any character
-
- [xyz] matches any single char in the string 'xyz'
- [^xyz] matches any single char except those in
- the string 'xyz'
- [a-z] matches any char between 'a' and 'z' inclusive,
- [^a-z] matches any char but those between 'a' and 'z'
-
- \ preceding a meta char removes its meta meaning.
-
- /pattern/z<cr> Redraw screen with next occurrence of string "pattern"
- /pattern/z.<cr> at the top, middle, or bottom of the screen (as
- /pattern/z-<cr> above). If the '/' delimiters are replaced by
-
- -> n Repeat last pattern search
- -> N Repeat last pattern search but reverse search direction
-
- -> fx 4fx Move ahead to 1st or 4th occurrence of character 'x'
- on current line
- -> Fx 4Fx Move back to 1st or 4th previous occurrence of
- character 'x' on current line
-
- -> ; 4; Repeat last fx or Fx command 1 or 4 times
- -> , 4, Repeat last fx or Fx command 1 or 4 times,
-
- but reverse search direction
- tx 4tx Move ahead to 1st or 4th char preceding next
- occurrence of char 'x' on current line
- Tx 4Tx Move back to 1st or 4th character following previous
- occurrence of char 'x' on current line
-
-
-
-
-
-
-
-
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 15
-
-
- 2.3 INSERTING AND APPENDING TEXT
- -----------------------------------------------------------------------
-
- -> <esc> End text modification and return to command mode
- (See also the ":set esc2<cr>" command)
-
- -> u Undo the last text modification change
-
- -> . Repeat the last text modification change
-
- -> a Append text until <esc>
- -> A Append text at end of line until <esc>
-
- -> i Insert text until <esc>
- -> I Insert text at beginning of line until <esc>
-
- -> o Open file below current line and insert text until <esc>
- -> O Open file above current line and insert text until <esc>
-
- -> <ctl-H> Backspace (and erase) one character
- Some keyboards have an explicit "backspace"
- key which you may also use. On some
- keyboards you may also use the "delete"
- key. This varies from machine to machine.
-
- -> <ctl-W> Backspace (and erase) one word
- to protect text entered from previous text
- modification commands, neither of these
- commands will backspace beyond the point
- where the currently active text insertion
- code was issued. Attempting to backspace
- any further causes a "beep".
-
- <ctl-V> Accept next character literally; ignore special meaning
- (allows entry of <ctl-H>, <ctl-W>, or
- <esc> char)
-
- 2.4 DELETING TEXT
- -----------------------------------------------------------------------
-
- -> D Delete remaining text in current line
- d$ Delete remaining text in current line
-
- -> dd 4dd Delete 1 or 4 lines
-
- -> dG Delete current line through last line in file
-
- -> dw 4dw Delete ahead 1 or 4 words
- -> dW 4dW Delete ahead 1 or 4 WORDS
-
- -> de 4de Delete 1 or 4 words up to the last char
- -> dE 4dE Delete 1 or 4 WORDS up to the last char
-
- db 4db Delete back 1 or 4 words
- dB 4dB Delete back 1 or 4 WORDS
-
- dl 4dl Delete 1 or 4 characters
-
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 16
-
-
- dfx 4dfx Delete characters from cursor position to 1st or 4th
- next occurrence of char 'x'
- dFx 4dFx Delete characters from cursor position to 1st or 4th
- previous occurrence of char 'x'
-
- dtx 4dtx Delete characters from cursor position up to character
- preceding 1st or 4th next occurrence of char 'x'
- dTx 4dTx Delete characters from cursor position to character
- following 1st or 4th previous char 'x'
-
- d) 4d) Delete from cursor position forward to end of 1st
- or 4th sentence
- d( 4d( Delete from cursor position backward to start
- of 1st or 4th previous sentence
- d} 4d} Delete from cursor position forward to end of
- 1st or 4th paragraph
- d{ 4d{ (This command is not implemented in current version
- of Oak Hill Vi (TM))
-
- dj 4dj Delete current line, or delete current line plus
- 4 lines below current line
- dk 4dk Delete current line, or delete current line plus
- 4 lines above current line
- dl 4dl Delete character at current cursor position (equiv
- to command "x"), or delete 4 characters
- dh 4dh Delete character to left of cursor, or delete 4
- characters to left of cursor
-
- Note: If you prefer an alternative syntax, you
- may invert the integer multiplier and the "d"
- operator in the above commands. For example,
- "d4j" is equivalent to "4dj".
-
- d0 Delete from beginning of line through cursor position
-
- -> d'x Delete text delimited by current line and
- line 'x (see "mx" command, Section 2.7)
- d`x Delete text delimited by cursor position and
- position `x
-
- d4G Delete line number 4 through the current line
-
- [range]d Delete lines specified in "range" -- see
- "LINE RANGE" below (Section 3)
-
- 2.5 CHANGING TEXT
- -----------------------------------------------------------------------
-
- Note: "Changing" text is like "deleting"
- text except that as soon as you've deleted
- the text, the program is in the input mode,
- waiting for you to type in the replacement text.
-
- -> C Change remaining text in current line
- c$ Change remaining text in current line
-
- -> cc 4cc Change 1 or 4 lines
-
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 17
-
-
- -> cG Change current line through last line in file
-
- -> cw 4cw Change 1 or 4 words forward in file
- -> cW 4cW Change 1 or 4 WORDS forward in file
-
- -> ce 4ce Change 1 or 4 words up to the last char
- -> cE 4cE Change 1 or 4 WORDS up to the last char
-
- cb 4cb Change 1 or 4 words backward in file
- cB 4cB Change 1 or 4 WORDS backward in file
-
- cl 4cl Change 1 or 4 characters
-
- cfx 4cfx Change characters from cursor position to 1st or 4th
- next occurrence of char 'x'
- cFx 4cFx Change characters from cursor position to 1st or 4th
- previous occurrence of char 'x'
-
- ctx 4ctx Change characters from cursor position up to character
- preceding 1st or 4th next occurrence of char 'x'
- cTx 4dTx Change characters from cursor position to character
- following 1st or 4th previous char 'x'
-
- c) 4c) Change from cursor position forward to end of 1st
- or 4th sentence
- c( 4c( Change from cursor position backward to start
- of 1st or 4th previous sentence
- c} 4c} Change from cursor position forward to end of
- 1st or 4th paragraph
- c{ 4c{ (This command is not implemented in current version
- of Oak Hill Vi (TM))
-
- cj 4cj Change current line, or change current line plus
- 4 lines below current line
- ck 4ck Change current line, or change current line plus
- 4 lines above current line
- cl 4cl Change character at current cursor position (equiv
- to command "x"), or change 4 characters
- ch 4ch Change character to left of cursor, or change 4
- characters to left of cursor
-
- Note: If you prefer an alternative syntax, you
- may invert the integer multiplier and the "c"
- operator in the above commands. For example,
- "c4j" is equivalent to "4cj".
-
- c0 Change from beginning of line through cursor position
-
- -> c'x Change text delimited by current line and
- line 'x (see "mx" command, Section 2.7)
- c`x Change text delimited by cursor position and
- position `x (see "mx" command, Section 2.7)
-
- c4G Change line number 4 through the current line
-
-
-
-
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 18
-
-
- 2.6 YANKING (COPYING) TEXT INTO YANK/DELETE BUFFER
- -----------------------------------------------------------------------
-
- Note: When you "yank" or "delete" text, you
- copy it into a temporary buffer. You may then
- "put" or "paste" (see "p" and "P" commands
- below) this text at some other point in the
- file.
-
- Y 4Y Yank remaining text in current line
- -> yy 4yy Yank 1 or 4 lines
-
- -> y$ Yank remaining text in current line
-
- -> yG Yank current line through last line in file
-
- -> yw 4yw Yank ahead 1 or 4 words
- -> yW 4yW Yank ahead 1 or 4 WORDS
-
- ye 4ye Yank 1 or 4 words up to the last char
- yE 4yE Yank 1 or 4 WORDS up to the last char
-
- yb 4yb Yank back 1 or 4 words
- yB 4yB Yank back 1 or 4 WORDS
-
- yl 4yl Yank 1 or 4 characters
-
- yfx 4yfx Yank characters from cursor position to 1st or 4th
- next occurrence of char 'x'
- yFx 4yFx Yank characters from cursor position to 1st or 4th
- previous occurrence of char 'x'
-
- ytx 4ytx Yank characters from cursor position up to character
- preceding 1st or 4th next occurrence of char 'x'
- yTx 4yTx Yank characters from cursor position to character
- following 1st or 4th previous char 'x'
-
- y) 4y) Yank from cursor position forward to end of 1st
- or 4th sentence
- y( 4y( Yank from cursor position backward to start
- of 1st or 4th previous sentence
- y} 4y} Yank from cursor position forward to end of
- 1st or 4th paragraph
- y{ 4y{ (This command is not implemented in current version
- of Oak Hill Vi (TM))
-
- yj 4yj Yank current line, or yank current line plus
- 4 lines below current line
- yk 4yk Yank current line, or yank current line plus
- 4 lines above current line
- yl 4yl Yank character at current cursor position (equiv
- to command "x"), or yank 4 characters
- yh 4yh Yank character to left of cursor, or yank 4
- characters to left of cursor
-
- Note: If you prefer an alternative syntax, you
- may invert the integer multiplier any the "y"
- operator in the above commands. For example,
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 19
-
-
- "y4j" is equivalent to "4yj".
-
- y0 Yank from beginning of line through cursor position
-
- y'x Yank text delimited by curr line and
- line 'x (see "mx" command, Section 2.7)
- y`x Yank text delimited by cursor position and
- position `x
-
- y4G Yank line number 4 through the current line
-
-
-
- 2.7 OTHER TEXT MODIFICATION COMMANDS
- -----------------------------------------------------------------------
-
- -> r Replace single character and return to command mode
-
- -> R Replace text on current line ("overstrike") until <esc>
-
- -> s 4s Substitute new characters for current character
- until <esc>
-
- -> S 4S Substitute new characters for current line until <esc>
-
- -> x 4x Delete 1 or 4 characters
- X 4X Delete 1 or 4 character before the cursor
-
- -> p Put last deleted/yanked lines below current line
- -> p Put last deleted/yanked text after current
- cursor position
-
- -> P Put last deleted/yanked lines above current line
- -> P Put last deleted/yanked text before current
- cursor position
-
- Note: Whether "text" or "lines" apply in the
- "put" commands above depends on whether
- a text string or text lines were yanked,
- deleted, or stored into the yank/delete
- buffer.
-
- -> J Join the current and following line into a single line
-
- ~ Change case of character at cursor location and
- advance to next character. (Undo doesn't
- work for this command; this command is
- its own undo.)
-
- >> 4>> Shift 1 or 4 lines one tab-shift to the right
- << 4<< Shift 1 or 4 lines one tab-shift to the left
-
- >adr Shift from current line through "adr" one tab-shift
- to the right
- <adr Shift from current line through "adr" one tab-shift
- to the left
-
- EXAMPLES:
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 20
-
-
-
- >'a
- </howdy/
- <73<cr>
-
- The first example will right-shift each line
- of text from the current line through the
- one marked "a" (see the "mark" command).
-
- The second example will left-shift each
- line of text from the current line through
- the one where the string "howdy" appears.
-
- The third example will left-shift each
- line of text from the current line through
- line number 73.
-
-
- :abbr macroname string1<cr>
- :unabbr macroname<cr>
- Abbreviate 'string1' with 'macroname' while in
- input mode. Every time the string 'macroname'
- is entered by itself (surrounded by spaces,
- tabs, carriage returns, or punctuation marks
- like .,!? etc), it will be replaced by
- string1, just as if you had typed string1
- instead of 'macroname'.
-
- EXAMPLE: If you type --
-
- :abbr rr requirements<cr>
-
- then thereafter, while in the input mode, you type
-
- we wrote new rr for the client
-
- as soon as the space after 'rr' is typed, the 'rr'
- will be replaced by 'requirements', leaving you with
-
- we wrote new requirements for the client
-
- This capability is good for frequently typed, lengthy
- words.
-
- The :unabbr command cancels the :abbr command with
- the specified macroname.
-
- You can have up to 10 macronames active at a time.
- The ":set<cr>" command will show you which
- abbreviations are active at any time.
-
- -> :[range]s/string1/string2/[g][p]<cr>
-
- String substitution command. For the range of
- lines indicated (see "Line Ranges", Section 3),
- substitute first occurrence of string1 with
- string2. If the optional 'g' appears after the '/'
- that follows string2, every occurrence of string1
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 21
-
-
- (not just the first) will be replaced by string2.
-
- If the 'p' option appears, each altered line
- will be printed at the bottom of the screen.
-
- If no range of lines is indicated, substitutions
- will take place on the current line only.
-
- The '/' delimiter character may be any character
- that does not appear in string1 or string2.
- (The only exception is that if no line specification
- is supplied, the string delimiter character must
- be a '/' to avoid ambiguity).
-
- String1 may contain meta characters.
-
- A '&' in string2 will be replaced by all of string1.
- Use '\&' if you want to insert a '&' character.
- The trailing '/' delimiter after string2 is optional.
-
- The "undo" command will "undo" the substitutions
- made by this command only if there is sufficient
- room in memory to store the range of lines selected.
- If there is not sufficient room, the substitutions
- can still be made, but a warning message will be
- printed first.
-
- EXAMPLES:
-
- :s/sam/bill<cr>
- :%s/bcr/Bell Communications Research/g<cr>
- :.,$s/^/ /<cr>
- :'a,'bs/ *$//<cr>
- :g/howdy/s//doody/gp<cr>
-
- The first example will substitute "bill" for
- the first occurrence of "sam" on the current line
-
- The second example will substitute "Bell Communications
- Research" for "bcr" for every line in the file.
-
- The third example will put five spaces at the
- front end of the current line through the last
- line of the file.
-
- The fourth example will remove (by substituting
- nothing for) all trailing spaces from the end
- of lines marked 'a' through 'b'.
-
- The fifth example will replace all occurrences
- of "howdy" by "doody" and will print each line
- altered at the bottom of the screen.
-
- & Repeat the last :[range]s command for the current
- line only.
-
- :[range]d<cr> Deletion command. Will delete lines in specified
- range.
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 22
-
-
-
- EXAMPLES:
-
- :/string/d<cr> deletes next line in which "string"
- appears
- :g/string/d<cr> deletes all lines in which "string"
- appears
- :g/^$/d<cr> deletes all blank lines
-
- :[range]t[spec]<cr>
-
- Transfer command. Copies lines in specified
- [range] and inserts the copied lines just below
- the line named in [spec]. This is a UNIX "ed"
- or "ex" command. Note you can do the same
- thing with "yank" and "put" commands.
-
- EXAMPLES:
-
- :15,20t35<cr> Copies lines 15 through 20 and
- inserts them just below line 35.
-
- :/Sam/,/Bill/t/Dave/<cr>
- Copies lines from the one
- containing "Sam" through the
- one containing "Bill" and
- inserts them just below the
- line containing "Dave".
-
- :[range]m[spec]<cr>
-
- Move command. Deletes lines in specified
- [range] and inserts the deleted lines just below
- the line named in [spec]. This is a UNIX "ed"
- or "ex" command. Note you can do the same
- thing with "delete" and "put" commands.
-
- EXAMPLES:
-
- :1,.m$<cr> Deletes lines 1 through the
- current line and moves them
- to the bottom of the file.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 23
-
-
- 2.8 WRITING, READING, AND EXITING
- -----------------------------------------------------------------------
- -> ZZ Write out (save) current buffer & quit editor.
-
- -> :w<cr> Write buffer out (save) to default file name.
- :wq<cr> Write buffer out (save) to default file name
- and quit editor.
-
- -> :w filename<cr> Write buffer out to "filename". This command will
- not overwrite an existing already file
- with the same name.
- -> :w! filename<cr>
- Write buffer out to "filename" unconditionally. This
- command will overwrite an already existing
- file with the same name.
-
- -> :q<cr> Quit editor and return to MS-DOS. For safety,
- the editor will not quit unless you have
- written out the buffer since the last
- change was made.
-
- -> :q!<cr> Quit editor unconditionally and return to MS-DOS.
- Any editing changes since your last "write"
- will be lost.
-
- -> :r filename<cr> Read "filename" into buffer following the current line.
-
- :e filename<cr> Dump current file buffer and edit "filename".
- No "filename" will cause current
- filename to be used. For safety,
- command is rejected if the buffer has
- been altered since the last write to
- disk. This command, as well as "e!"
- and "we" will clear the (unnamed)
- yank/delete buffer and the buffer used
- to store the repeat-last-command
- command (".").
-
- :e! filename<cr>
- Dump current file buffer and edit "filename"
- (unconditionally).
-
- :we filename<cr>
- (NON-UNIX) Write out current buffer to disk,
- dump buffer, and begin editing "filename"
-
- :[range]w[>>] filename<cr>
- Write [and append] command with optional line range
- specification (see Line Range discussion) --
- if the '>>' follows the 'w', buffer contents
- will be appended to filename.
-
- EXAMPLES:
-
- :'a,$w>> george<cr>
- :1,.w albert<cr>
-
- The first example will append to file "george"
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 24
-
-
- the text delimited by line 'a and the
- last line (inclusive). The second example
- will write out the first line through the
- current line to file "albert".
-
- vi +[command] file[s] (Executed from MS-DOS prompt)
- :e +[command] file[s] You can invoke Oak Hill Vi (TM) with an
- initial command that will be executed
- as soon as your file has been read.
-
- EXAMPLES:
-
- vi + file Edit "file" starting at last
- line.
-
- vi +3 Edit "file" starting at line 3
-
- vi +/string file
- Edit "file" starting at the
- first line were "string"
- appears
-
- vi +"command" file
- Edit "file" and execute
- "command" immediately
- after the file has
- been read
-
- Note that if "string" or "command" contains
- spaces, they should be enclosed in
- quotation marks or Oak Hill Vi (TM) will
- confuse the arguments with file names.
-
- EXAMPLE:
-
- vi "+/Now is the time" file
-
- is the correct way to start
- editing "file" at the line that
- contains the string "Now is
- the time"
-
- All of the above features also work if you
- use the :e command from inside the editor.
- For example,
-
- :e +3j file<cr>
-
- will edit "file" starting at line 3. In
- the current version of Oak Hill Vi (TM),
- however, embedded blanks in the command
- string are not allowed and will cause parts
- of the command string to be interpreted as
- file names.
-
- :n<cr> Edit next file name in the queue. See
- Section 1.4
- :r <n1> <n2> filename<cr>
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 25
-
-
- (NON-UNIX) Read lines n1 through n2 from filename
- into buffer below current cursor position.
- Requires that (1 <= n1 <= n2 <= 32000). If
- n2 is larger than the last line, read will
- proceed to end of file. "$" may be used in
- place of n2 to represent 32000. This
- command, combined with write (:w) commands,
- is useful for splitting large files into
- smaller pieces that Oak Hill Vi (TM) can
- handle. (See also the discussion of the
- "slice" utility program below.)
-
- EXAMPLE:
-
- :r 100 200 george<cr>
-
- will read lines 100 through 200 of file george
- into the buffer.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 26
-
-
- 2.9 OPTION-SETTING AND OTHER COMMANDS
- -----------------------------------------------------------------------
-
- *** OPTION SETTING COMMANDS ***
-
- :set all<cr> Display current setting of all settable options.
- :set <cr> Also show the full directory path in which the
- VISETUP.VI file (if any) was found.
-
- :set ai<cr> Turn on autoindent
- While inserting text, automatically copy the
- indentation (white space characters) used on
- the previous line. You can backspace over
- the indentation characters with <ctl-D>.
- :set noai<cr> Turn off autoindent (default)
-
- :set aw<cr> Turn on autowrite (default)
- Before escaping to DOS (with :! command) write
- the buffer out to disk if it has been altered
- since the last save.
- :set noaw<cr> Turn off autowrite
-
- :set beep<cr> Have computer speaker sound a "beep" on user errors
- (default).
- :set nobeep<cr> Keep computer speaker silent on errors -- instead
- flash a "BEEP!" message briefly at the
- bottom of the screen. This option is
- useful if (for example) you are using a
- laptop machine in a conference room and
- wish to avoid annoying those around you
- with a beeping computer.
-
- :set ctr=n<cr> (NON-UNIX) Set column about which lines will be
- centered when using the ":center" command.
- Default n=40.
-
- :set cursor=underscore<cr>
- :set cursor=box<cr>
- (NON-UNIX) Set cursor type. On some machines,
- particularly those with LCD displays, a
- simple underscore for the cursor is hard to
- see, so Oak Hill Vi (TM) uses a "flashing box"
- cursor as the default. On a CRT, the
- traditional flashing underscore is
- preferred by some users. This set command
- allows the user to set to cursor type to
- match his/her preference. The default is
- the underscore.
-
- :set esc2=x<cr> (NON-UNIX) On some keyboards the escape key is clumsy
- to reach. This command allows the
- character 'x' to serve the same purpose,
- where 'x' can be any character. Reasonable
- choices are <ctl-O> or <ctl-J>. Caution:
- If you choose a character that is already
- serving another purpose, for example 'a',
- you will disable that function! Note that
- <ctl-[> is equivalent to hitting an escape
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 27
-
-
- key.
-
- :set colors=[bright] foreground [on] background<cr>
-
- (NON-UNIX) Set foreground and background colors.
- The color names must be chosen as shown
- below.
-
- Available Colors
- ------------------
- black
- red
- green
- yellow
- blue
- magenta
- cyan
- white
-
- To get bold foreground characters, include the
- word "bright" before the foreground color name.
-
- Only the first 3 letters of each color name
- need or key word need be used, and the "on"
- key word is optional.
-
- Valid EXAMPLES:
-
- :set colors = white on blue<cr>
- :set colors = bright yellow on red<cr>
- :set col bri whi red<cr>
-
- If colors are not explicitly set, Oak Hill
- Vi (TM) will default to the colors being
- used when the program was called. If the
- colors are explicitly set, Oak Hill Vi (TM)
- will return to the starting colors when the
- program exits.
-
- :set ic<cr> Ignore case (upper/lower) when doing string searches
- :set noic<cr> Do not ignore case when doing string searches (default)
-
- :set idm<cr> Print "Input Mode" identification tag in lower right
- corner of screen after "i", "a", "o", "O",
- "cc", "r", "s", or other commands that
- expect input text from the keyboard.
- (default)
- :set noidm<cr> Do not print the "Input Mode" identification tag.
-
- :set lines=n<cr>
- (NON-UNIX) Resets number of lines screen can display.
- This number is not arbitrary; n must match
- the number of lines on your screen. In most
- cases, the default value of 25 is correct.
-
- :set magic Recognize meta characters when doing pattern searches.
- :set nomagic Do not recognize meta characters when doing pattern
- searches. Interpret each character literally.
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 28
-
-
- See Section 2.4.
-
- :set nu<cr> Turn on line number option
- :set nonu<cr> Turn off line number option (default)
-
- :set press<cr> Require a carriage-return after program greeting
- screen (default)
- :set nopress<cr>Do not require carriage-return after greeting screen
-
- :set ts=n<cr> Set tab stops every n spaces --
- n can be any number from 1 to 40.
-
- :set wm=n<cr> Set wrap margin to n spaces -- automatically generates
- carriage returns when n or fewer spaces
- remain on the line. ":set wm=0" (the
- default) will disable the function. This
- command is useful for high-speed typing --
- carriage-returns are supplied by the
- program.
-
- :set ws Wrap around end of file on searches (default)
- :set nows Do not wrap around end of file on searches
-
- :set rmar=n<cr> (NON-UNIX) Set right margin for text filling (see below)
- Default value is rmar=70.
-
-
-
- *** OTHER COMMANDS ***
-
- :heap<cr> (NON-UNIX) Print the number of free bytes still
- available in the memory heap. The number
- indicated is rounded down to the nearest 500
- bytes. The indicated space is not completely
- available for text because each line of text
- requires at least 10 bytes of overhead.
-
- :clear<cr> (NON-UNIX) Clear the yank, last-command, and
- named buffers, and show the number of free
- bytes still available in the memory heap.
-
- :[range]fill <cr>
- (NON-UNIX) In the range specified, fill text with
- left margin copied from current line and
- right margin 'rmar' spaces. See detailed
- "FILL" description below.
-
- :[range]rfill <cr>
- (NON-UNIX) Same as :fill except that new sentences will
- begin on a new line. This is useful for making
- already-filled text easier to edit.
-
- -> :fillp<cr> (NON-UNIX) Fill paragraph. Like :fill except that
- the entire paragraph in which the cursor
- sits is filled (no need to mark any text).
- A paragraph is a section of text delimited
- by blank lines, the start or end of a file,
- lines that begin with a space or any of the
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 29
-
-
- characters in the string ".-_=*", or a
- <ctl-X>.
-
- :rfillp<cr> (NON-UNIX) Reverse fill paragraph. Like "fillp" except
- that new sentences will begin on a new line.
-
- :[range]upcase (NON-UNIX) Convert to upper case the range of
- lines indicated.
- :[range]lowcase (NON-UNIX) Convert to lower case the range of
- lines indicated.
-
- :[range]center (NON-UNIX) Center on the page the range of
- lines indicated. Control characters, tabs,
- and leading or trailing spaces will be
- ignored when this command computes where to
- place the line. Lines greater than 80
- characters will not be altered. Lines will
- be centered about the current value of
- "ctr". By default ctr=40. It may be
- altered with the ":set ctr=n" command.
-
- v Print greeting message and Oak Hill Vi (TM) version
- number on screen.
-
- -> <ctl-L> Redraw the screen -- useful if display becomes
- corrupted.
-
- -> mx Mark the current line and cursor position with
- an identifying character from [a-z] (see
- 'x command, up to 10 lines may be marked;
- erasure and re-use of the 10 is automatic)
-
- -> <ctl-G> Same as ":f<cr>" as described below
- -> :f<cr> Print on the status line the name of the current file,
- the line number, the total number of lines,
- total characters to end of current line,
- and total number of characters in file. If
- the file has been modified and has not been
- written out to disk, the indicator
- "[modified]" will appear next to file name.
-
- -> :!<cr> Escape to MS-DOS.
- -> :shell<cr> Either of these commands escapes to MS-DOS and
- allows you to enter DOS commands without
- exiting the Oak Hill Vi (TM) editor. A copy
- of the MS-DOS program COMMAND.COM must be
- accessible via the current MS-DOS PATH on
- the current disk. Enough unused memory
- must be available to run COMMAND.COM and
- the DOS command you choose. Otherwise an
- error message will be generated.
-
- :!cmd<cr> Same as above except that the DOS command "cmd"
- will be executed immediately.
-
- <ctl-C> Abort program. This is an MS-DOS command to
- be used in case the program seems "hung".
- When the program is operating normally,
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 30
-
-
- this command will not generate an abort.
-
- "x<n><yank> Named buffer yank/delete: on next yank or delete
- "x<n><delete> command, save yanked or deleted text in
- buffer x where x is a character from [a-z]
- as well as saving it in the usual default
- buffer.
-
- EXAMPLES: "a6yy
- "x4dw
-
- The first example will yank six lines
- and store them in buffer 'a'.
-
- The second example will delete four words
- and store them in buffer 'x'.
-
- "xp Named buffer put: do a put (p or P) command using
- "xP the contents of named buffer x rather than the
- contents of the default buffer.
-
- EXAMPLE: "ap will put the contents of marked
- buffer 'a' after the current line or
- cursor position.
-
- !adr!cmd<cr> This command will delete a group of lines from the
- current line to the line at address adr, pass
- those lines through an external filter 'cmd',
- and load the results into the location
- originally occupied by the unfilterd lines.
-
- Note: This command is not preceded by a colon.
-
- Examples:
-
- !3j!sort<cr>
- !'a!sort<cr>
- !21Gsort<cr>
- !Gsort<cr>
- !!dir<r>
-
- The first example will pass the current line and
- the next three lines through the DOS 'sort' filter
- and replace the original lines with a sorted
- version.
-
- The second example will do the same for the current
- line through the line marked 'a'.
-
- The third example will do the same for the current
- line through the 21st line.
-
- The fourth example will do the same for the current
- line through the last line.
-
- The fifth example will replace the current line
- with output of the DOS 'dir' command (useful for
- looking at the contents of directories without
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 31
-
-
- leaving the editor).
-
- This command can be undone with the 'u' (undo)
- command.
-
- Note: This command must write temporary "scratch"
- files to your current default directory. There
- must be enough space for these files or the command
- will fail.
-
- :map x string<cr>
- Make character x stand for the commands in "string".
- Use <ctl-V> to preface any special
- characters like carriage return or
- backspace. Up to ten mappings can be
- stored. Those older than the latest ten
- are forgotten. "Unmap" by mapping x back
- into itself -- 'map x x<cr>'
-
- EXAMPLE: :map T /George^V<cr>cwBill^V<esc><cr>
-
- will make the command 'T' search for the next
- occurrence of the pattern "George" and convert
- it to "Bill".
-
-
- 2.10 IBM EDIT KEYS
- ----------------------------------------------------------------------
-
- IBM EDIT AND DISPLAY CONTROL KEYS
- -----------------------------------------------------------------------
- Left-arrow Cursor left 1 or 4 characters (same as 'h 4h')
- Right-arrow Cursor right 1 or 4 characters (same as 'l 4l')
- Up-arrow Cursor up 1 or 4 lines (same as 'k 4k')
- Down-arrow Cursor down 1 or 4 lines (same as 'j 4j')
-
- Pg Dn Jump ahead one screenfull (same as <ctl-F>)
- Pg Up Jump back one screenfull (same as <ctl-B>)
- Home Jump to first line (same as '1G')
- End Jump to last line (same as 'G')
-
- Del Delete 1 character (same as 'x 4x')
- Insert Insert text (same as 'i')
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 32
-
-
- 3.0 LINE RANGE SPECIFICATION
- =======================================================================
- Line ranges are specified in the form
-
- [spec1,[spec2]]
-
- If both spec1 and spec2 are missing, the implied range is simply
- the current line.
-
- If spec2 is missing, the implied range is spec1.
-
- Spec2 must be greater than or equal to spec1 or an error message
- will be generated.
-
- The spec values may be an integer line number, "." to represent the
- current line, "$" to represent the last line, "'a" to represent the
- line named "a" (see mx command, Section 2.7), "%" as a shorthand to
- indicate all lines, or a pattern search "/string/". Any of these
- spec values except % may be followed by a "+n" or "-n" to indicate
- a count of lines above or below the spec. Alternatively, "+++" is
- equivalent to "+3" for example.
-
- Spec EXAMPLES:
-
- 4,30 Line numbers 4 through 30.
-
- .,$ Current line through last line.
-
- 'a,'b Lines named (see mx command, Section 2.7) 'a through 'b.
-
- 'a,. Line 'a through the current line.
-
- % Lines 1 through last line (synonymous with 1,$).
-
- (nothing) Current line only
-
- /Dorothy/ Next line on which the string "Dorothy" appears
-
- .,.+4 Current line through next four lines
-
- .,.++ Current line through next two lines
-
- --- Third line above current line ("." is default)
-
- /Sam/++ Second line below line where "Sam" occurs
-
- $-1 One line above last line
-
-
-
-
-
-
-
-
-
-
-
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 33
-
-
- 4.0 TEXT FILL AND CENTERING FEATURES
- =======================================================================
- With the ":fill" and ":center" commands, you can do elementary
- word processing within Oak Hill Vi (TM).
-
- 4.1 TEXT FILL FEATURE
- --------------------------------------------------------------------
- The "fill" feature allows you to clean up "ragged" lines of varying
- length will a single command. This function is sometimes called
- "formatting." The range of text to be filled may be specified with
- a line range specification, or you can use the ":fillp" command to
- fill text as you edit.
-
- For example, suppose you have entered and edited text in the
- following "ragged" form --
-
- Man is a singular creature. He has a set of gifts
- which make him unique among the animals: so that
- unlike them, he
- is not a figure in the landscape -- he is a shaper
- of the landscape.
- In body
- and in mind he is the explorer of nature, the
- ubiquitous animal, who
- did not
- find but has made his home in every continent.
-
- By issuing a single command, Oak Hill Vi (TM) will replace this
- paragraph with the following neatly filled text --
-
- Man is a singular creature. He has a set of gifts
- which make him unique among the animals: so that unlike
- them, he is not a figure in the landscape -- he is a
- shaper of the landscape. In body and in mind he is the
- explorer of nature, the ubiquitous animal, who did not
- find but has made his home in every continent.
-
- EXAMPLES:
-
- :fillp<cr> will fill the paragraph where the cursor is located
- :fill<cr> will fill the current line only
- :'a,.fill<cr> will fill the line marked "a" to the current line
- :%fill<cr> will fill the entire file
-
- If the last (non-white-space) character on a line is an
- end-of-sentence character ('.', '?', or '!'), that line will
- be followed by two spaces in the filled text.
-
- When filling text:
-
- Blank lines are not affected, so paragraphing will be
- preserved.
-
- Lines whose first non-white space character is a '.'(period)
- will not be affected, so any UNIX nroff/troff command lines
- (like .P, .sp etc.) will not be altered.
-
- Lines whose first non-white space character is a ^M or ^L will
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 34
-
-
- not be altered.
-
- Lines that begin with a <ctl-X> will not be altered. This
- feature lets you explicitly "protect" lines from the fill
- function with a character that can be removed later by a
- global substitution.
-
- Any control characters present in the text are "not counted"
- in performing the fill operation. For example the strings
-
- ^Uhello^T
-
- and
-
- hello
-
- are both counted as occupying five columns. This lets you
- imbed printer control characters in the text without affecting
- the "fill" of the final text. These control characters can be
- expanded to longer control sequences (if required) by a global
- substitution or with the "page" program described below.
-
- The text fill operation is reversible with the "u" (undo) command.
-
- Note: It is good practice to fill modest-sized blocks of text at a
- time. Because the undo function must "remember" the text block the
- way it was before filling, the program must find enough heap memory
- to hold the "old" version. The program will not abort if you
- attempt to fill too much text at once; it will simply generate a
- warning message asking you if you wish to proceed even though the
- fill will not be reversible. Of course if you wish to fill a large
- file all at once you can always put a safety copy of the file on
- disk with the ":w filename<cr>" command.
-
- The fill operation will observe a right margins set by rmar. The
- left margin will be "copied" from the current line. The left
- margin may be any number of consecutive spaces or tab characters.
-
- Example: if rmar=70 and the current line has two tab characters at
- the front of the line, the text will be filled with a right margin
- at the 70th column, and the left margin will be 16 columns (two tab
- characters) for every line in the fill range. The value for rmar
- may be set to any number from 20 to 160, but the fill operation
- will be rejected if rmar is less than 20 characters from the left
- margin.
-
- Note: for a given selection of margin settings the results of fill
- operations will be the same whether the line number option, ":set
- nu<cr>" has been activated or not. If the option is "on", the text
- will appear on the screen to be right-shifted by 8 columns to leave
- room for the line number, but the margins and line lengths in the
- actual text will be the same as if the line number option were
- turned off.
-
- Text is generally easier to edit if each new sentence begins on a
- new line. Once text has been filled, it becomes harder to edit
- because a new sentence may begin anywhere. To make it easier, use
- the "rfill" command (mnemonic - "reverse fill" or "roff fill").
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 35
-
-
- This command works like "fill" except that (1) every new sentence
- (defined below) is forced to begin on a new line, and (2) the left
- margin is forced to zero. "rfillp" is like "rfill" except that
- only a single paragraph (the one in which the cursor is located)
- will be affected.
-
- EXAMPLES:
-
- :'a,'brfill<cr> will "reverse fill" text from lines "a" to "b"
- :rfillp<cr> will "reverse fill" the current paragraph
-
- Oak Hill Vi (TM) assumes a new sentence has begun if it finds an
- end-of-sentence character followed by two spaces, or an
- end-of-sentence character that is the last non-white-space
- character on the line.
-
- If you use the "fillp" and "rfillp" operations frequently, don't
- forget the convenience of the "map" command to simplify your
- typing. We recommend commands like
-
- :map > :fillp^M<cr>
- :map < :rfillp^M<cr>
-
- for your VISETUP.VI file (see the "SETUP FILE" section). Then when
- you wish to fill the text in a paragraph, all you have to do is
- issue the command ">" or "<".
-
- 4.2 TEXT CENTERING FEATURE
- --------------------------------------------------------------------
- The "center" command allows you to center one or more lines of
- text. As in the "fill" command, control characters are ignored in
- calculating where to start the line. This allows you to place
- printer control characters in-line with the text without affecting
- centering.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 36
-
-
- 5.0 SETUP FILE "VISETUP.VI"
- =======================================================================
- If you have a standard set of options or commands you would like
- exercised automatically every time the program loads, they may be
- entered into a special file for that purpose called VISETUP.VI.
-
- Every time Oak Hill Vi (TM) is loaded, it looks for VISETUP.VI
- first in the current directory. If it is not found there, the
- MS-DOS PATH environment variable is fetched, and each directory in
- the path is searched in turn until the file is found. If the file
- is not found, all default variables are used. Therefore, a good
- place to store your "basic" VISETUP.VI file is wherever you have
- stored the Oak Hill Vi executable file.
-
- If you'd like to have editing features that are customized for
- particular text files, just store a customized VISETUP.VI in the
- same directory as the text file, and make that directory your
- default directory as you edit.
-
- If you want to check the directory in which Oak Hill Vi (TM) found
- your VISETUP.VI file, use the ":set<cr>" command. The first line
- of the output from this command will show where the VISETUP.VI
- file, if any, was found.
-
- An example of a setup file that (a) automatically invokes line
- numbering, (b) sets a margin wrap at 10 spaces, (c) maps the
- command ">" into a fill-paragraph command, (d) maps "<" into
- fill-paragraph with-each-sentence-on-a-new-line command, (e) sets
- the right margin for text fills at column 75, and (f) jumps
- immediately to the last line of the file, is given by the
- seven-line setup file --
-
- :set nu
- :set wm=10
- :map > :fillp^M
- :map < :rfillp^M
- :set rmar=75
- G
-
- Each command must appear on a separate line.
-
- Note that if a carriage return is required as part of the command
- itself (as in the "map" commands), it must appear explicitly -- the
- carriage return at the end of each line in VISETUP.VI doesn't
- count! (If you are using Oak Hill Vi (TM) to create VISETUP.VI,
- just "quote" the carriage return by preceding it with a <ctl-V>.)
- It will appear as "^M".
-
-
-
-
-
-
-
-
-
-
-
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 37
-
-
- 6.0 MEMORY AND FILE SIZE CONSIDERATIONS
- =======================================================================
- The current version of Oak Hill Vi (TM) does all editing on buffers
- stored in a core memory "heap". Except when reading and writing
- files, the program does not access disk storage. This has the
- advantage of making the program very fast, as well as reducing the
- power consumption and noise level in battery-powered lap-top
- portable computers with disk drives. It has the disadvantage of
- limiting the maximum-sized file you can edit.
-
- Maximum file sizes for the two program models are:
-
- Approximate Available
- Max File Size Machine Memory
- -----------------------------------------------------
- Standard Model 250,000 characters 640K bytes
- Compact Model 35,000 characters 140K bytes
-
- Oak Hill Vi (TM) makes its own internal checks on the memory heap
- as you use it. You will receive warning messages as you approach
- the end of the available heap. When such a message appears and you
- are editing a large file, it is best to save your work, exit the
- program, and "slice" the file into smaller sub-files using the
- special read routine described below or the separate "SLICE"
- utility program described in the next section.
-
- Heap warning messages may also appear after very long editing
- sessions on files that are below the maximum sizes shown above.
- This is because the overhead of memory management is not entirely
- recoverable after every editing change, and eventually the heap
- becomes exhausted. In this case, the best thing to do is simply to
- write out the buffer and quit ("ZZ" or ":wq"), and restart the
- program.
-
- If warning messages are ignored and the heap becomes corrupted, the
- program will terminate abruptly, and all editing done since the
- last save will be lost. The abort is necessary since any attempt
- to write out a corrupted heap would destroy an already-saved file.
-
- If you wish, you can monitor the status of the memory heap with the
- command ":heap<cr>". This will show the size of the heap that Oak
- Hill Vi (TM) still has available. Chunks of memory under 500 bytes
- are not counted. The ":clear<cr>" works like ":heap<cr>" except
- that it will first free any memory held by the yank/delete buffers
- and all the named buffers.
-
- Another way to monitor remaining available memory is to use the
- shell escape command, ":!<cr>", and run the DOS chkdsk command.
-
- If you use core-resident programs (like Borland's "Sidekick"), it
- is best to have these programs loaded before you run Oak Hill Vi
- (TM). Do not start core-resident programs from the Standard Model
- Oak Hill Vi shell escape. If you do, you will "box in" Oak Hill Vi
- and the heap will exhaust almost immediately!
-
- "Boxing in" is not a problem with the Compact Model because that
- model requests its full allotment of 64K as soon as the program
- loads. If you wish to use Oak Hill Vi (TM) as one of several
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 38
-
-
- core-resident programs you should use the Compact Model. Note
- that other than the shell escape feature, no explicit support is
- provided to do make Oak Hill Vi (TM) "core-resident".
-
- If you wish to edit a file that is larger than (or even close to)
- the maximum sizes shown, we recommend that you first break the file
- into "chapters" or major sections of about half the maximum sizes
- shown, using the "slice" utility and/or the ":r n1 n2 filename"
- command described below.
-
- Example: Suppose the ASCII file "george" contains 400,000
- characters. Assuming an average of 50 characters per line, george
- contains about 8000 lines. Therefore to break george into four
- files, the following sequence of Oak Hill Vi (TM) commands may be
- used.
-
- vi temp
- :r 1 2000 george
- :w chap1
- dG
- :r 2001 4000 george
- :w chap2
- dG
- :r 4001 6000 george
- :w chap3
- dG
- :r 6001 8000 george
- :w chap4
- :q!
-
- These commands will break george into four files called chap1,
- chap2, chap3, and chap4. These may be edited separately and later
- recombined with the MS-DOS command --
-
- copy chap1+chap2+chap3+chap4 george or copy chap* george
-
- See the discussion of the "slice" program below for another
- approach to examining and breaking apart large files.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 39
-
-
- 7.0 "SLICE" UTILITY PROGRAM
- ========================================================================
- The "slice" utility program may be used to (A) count the lines,
- words, and characters in a file (B) list a designated range of
- lines (C) cut a file into smaller, easier-to-edit sub-files (D)
- find good "cutpoints" for a large file by searching for specified
- character strings in the file.
-
- -----------------------------------------------------------------
- (A) Counting lines, words, and characters
-
- Usage: slice filename1 [filename2 ...]
-
- This usage will produce a one-line message telling how many total
- lines, words (character strings separated by white space), and
- characters a given file has.
-
- EXAMPLE: slice george sam bill
-
- This would produce three messages like the following --
-
- "george" has 122 lines, 916 words, 4562 characters
- "sam" has 14 lines, 102 words, 706 characters
- "bill" has 2034 lines, 11301 words, 58931 characters
-
- -----------------------------------------------------------------
- (B),(C) Listing and cutting a designated range of lines.
-
- Usage: slice n1 [n2] [^]filename1 [> filename2]
-
- To help you decide where to break a file, you can list selected
- lines of a file with this command. If n1 and n2 are specified,
- lines n1 through n2 will be sent to the screen. If only n1 is
- specified, all lines from n1 to the end of the file will will be
- sent to the screen. If the filename is preceded by a carot (^), a
- line number will precede the listing of each line.
-
- If the output is redirected with the ">" character, the designated
- file segment will be written into filename2. This is how the file
- can be split.
-
- EXAMPLE:
-
- Suppose you use
-
- slice 200 400 ^george
-
- to determine that a good breakpoint in george comes at line 263,
- where a major text heading begins.
-
- You may then use
-
- slice 1 262 george > george1
- slice 263 george > george2
-
- to create the two smaller sub-files george1 and george2.
-
- -----------------------------------------------------------------
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 40
-
-
- (D) Finding cutpoints with a string search
-
- Usage: slice // filename1 [filename2 ...]
- slice %% filename1 [filename2 ...]
-
- These commands will accept the list of filenames and then ask you
- for a search string on a separate input line. The program will
- then supply a line number and list every line where it finds the
- specified string. The first ("//") version requires an exact match
- to the search string. The second ("%%") version allows the use of
- meta characters (see the string search discussion in the "TEXT
- SEARCH" section above).
-
- It can be tedious to list hundreds of lines looking for a good
- cutpoint. If you already know some of the text on the line where
- you would like to make a cut (for example the title of a major
- heading), you can use these commands to locate the cutpoint more
- quickly.
-
- EXAMPLE: slice // george
-
- will produce the query
- Enter search string:
-
- Suppose you supply a string from heading that you know starts a
- major section of your file.
-
- MARKET ANALYSIS
-
- The program would then scan the entire file george and produce an
- output like this --
-
- george:
- 388 PRELIMINARY MARKET ANALYSIS RESULTS
-
- You would then know to cut the file at line 388.
-
- Entering the slice command with no arguments will print a summary of
- the command syntax.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 41
-
-
- 8.0 "PAGE" TEXT PROCESSING PROGRAM
- =======================================================================
- The "page" program is a simple utility to add top-of-page and
- bottom-of-page processing (including page numbers, headers, and
- footers) needed before sending a file to a printer. "Page" will
- also translate user-settable characters into special strings to
- control printer underlining, bold, or other special functions.
-
- With the "fill" function of Oak Hill Vi (TM) and the "page"
- program, Oak Hill Vi makes a fast, simple, word processor as well
- as a text editor.
-
- Usage:
- page [-Tn] [-Bn] [-Ln] [-Nn] [-Sn] [-Cn] filename1 [> temp]
-
- The "n" values are the following integer constants.
-
- -Tn number of blank lines at the top of the page (default=5).
- -Bn number of blank lines at the bottom of the page (default=3).
- -Ln length of page in lines (default=66).
- -Nn sets page on which first header appears (default=2).
- -Sn sets page number value in first-appearing header (default=2).
- -Cn sets center column for headers and footers (default=30).
-
- The processed files will be printed to the screen with page
- spacing, page headers, and numbers inserted. (No page numbers will
- be inserted if there are less than 3 blank lines at the top of the
- page.) If the "> temp" is appended, the output will be placed in
- file "temp" where it can be sent to a hard copy printer.
-
- EXAMPLE:
-
- page -L88 george > ggg
-
- will put a ready-to-print version of file "george" into the file
- "ggg". The file "ggg" will be set up for an 88-lines-to-the-page
- printing.
-
- 8.1 PAGE HEADERS AND FOOTERS
- --------------------------------------------------------------------
- Page "headers" and "footers" can be added to the printed output by
- imbedding the strings in the text with the syntax:
-
- .HEADER=headerstring
- .FOOTER=footerstring
-
- Everything past the equal sign "=" will appear in a header or
- footer string.
-
- EXAMPLE:
-
- If the file "george" has the lines (with the '.' in column 1)
-
- .HEADER=This Is A Header
- .FOOTER=This Is A Footer
-
- page -C25 -S15 george > ggg
-
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 42
-
-
- will put a ready-to-print version of file "george" into file "ggg"
- with headers and footers centered about column 25. Page numbering
- will begin with a "This is a Header -- Page 15" at the top of the
- first page of output.
-
- 8.2 CHARACTER TRANSLATION
- -----------------------------------------------------------------------
- As it processes a file, "page" will optionally translate
- user-designated characters into user-designated character strings.
- By imbedding control characters in the text (which are not
- "counted" when filling text -- see Section 4), print control such
- as bold or underlining can be imbedded with the test.
-
- The translation table is contained in a separate file called
- "TRANS.PVI". Page will search for this file first in the current
- directory, then in the directory "\BIN", then "\LIB", and finally
- the root directory "\". If it cannot find the file, no
- translations will take place.
-
- The following is an example of a legitimate "TRANS.PVI" file
- format:
-
- ; File Start
- ; Hewlett Packard Thinkjet Translation Codes
-
- ^A ^O ; Bold Off
- ^B ^N ; Bold On
-
- ^T ^[&d@ ; Underline Off
- ^U ^[&dD ; Underline On
-
- ^R ^[&k0S ; Normal Print Pitch
- ^S ^[&k1S ; Expanded Print Pitch
- ^Y ^[&k2S ; Compressed Print Pitch
- ^Q ^[&k3S ; Expanded-Compressed Print Pitch
- ; File End
-
- In this file (as in the Oak Hill Vi (TM) screen display), control
- characters are indicated by a leading '^' character.
-
- The indicated TRANS.PVI file (supplied on the program disk) will
- translate every ^U character into the sequence ^[&dD and every ^B
- character into the sequence ^N. The following are syntax rules for
- TRANS.PVI:
-
- 1. Blank lines are ignored.
- 2. Any text to the right of a ';' character is ignored.
- 3. Any single character except ';' and '^Z' may be translated.
-
- EXAMPLE:
-
- During editing you enter:
-
- ^UFourscore and seven years ago^T, our forefathers brought
-
- When run through "PAGE" and the TRANS.PVI table above, this line
- becomes:
-
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 43
-
-
- ^[&dBFourscore and seven years ago^[&d@, our forefathers brought
-
- And when printed on the Thinkjet the phrase "Fourscore and seven
- years ago" will be printed in bold.
-
- 8.3 OTHER
- -----------------------------------------------------------------------
- A <ctl-L> (form-feed) character at the beginning of any line will
- cause a skip to the next page. Any remaining characters on the
- line are ignored.
-
- Entering the page command with no arguments will print a summary of
- the command syntax.
-
-
- 9.0 OAK HILL Vi (TM) and UNIX (TM) Vi
- =======================================================================
-
- In building Oak Hill Vi (TM) we have tried to include all of UNIX
- Vi's most commonly used features. We apologize if we've left out
- one of your favorites! Generally, if a feature that you like is
- missing, you'll find that there is another reasonable (though
- perhaps less familiar) way to do the same thing.
-
- We are continuing to improve Oak Hill Vi (TM), adding features as
- requested while attempting keeping the program compact, fast, and
- all "core-based". If you have special interest in a feature you
- would like to see added to Oak Hill Vi (TM), please write us to
- tell us about it. If you are among the first three people to
- request a new feature that is subsequently added, you will receive
- a free update to the program.
-
- Some of the differences between UNIX (TM) Vi and Oak Hill Vi (TM)
- that you may find important are:
-
- 1. The current version of Oak Hill Vi allows lines to be no more
- than 512 characters. Most UNIX Vi editors allow 1024 characters.
-
- 2. The entire "ex" editor command set available under UNIX Vi is
- not available on Oak Hill Vi (TM). However most of the commonly used
- "ex" commands have been included.
-
-
- 10.0 MISCELLANEOUS INFORMATION
- =======================================================================
-
- DOS ASCII FILES AND THE "LINE TOO LONG" ERROR MESSAGE:
-
- The standard DOS ASCII text file indicates the end of a line of
- text with a carriage-return/line-feed (CR-LF) character sequence.
- Oak Hill Vi (TM) will edit any text file that uses this sequence or a
- single line-feed (LF) as the end-of-line character.
-
- In some cases you may encounter files that use only a single
- carriage return (CR) as the end-of-line character. Some text
- editors or downloading routines may produce such files. If you
- attempt to edit such a file with Oak Hill Vi (TM) you may get a
- "Line too long" or "File empty" error message. However, you may
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 44
-
-
- convert such a file to a standard DOS ASCII file with the
- CR_CRLF.EXE utility supplied with Oak Hill Vi. The command
-
- CR_CRLF FILE1 FILE2
-
- will copy "FILE1" to "FILE2" and substitute a CR-LF pair for every
- CR that is not already followed by a LF.
-
- Be especially careful about trying to edit non-ASCII files, for
- example files that end in .EXE or .COM. The results can be
- unpredictable. If you should accidentally read in an non-ASCII
- file, simply exit with a ":q!<cr>". It is important that you not
- make any changes in the file, because if you then attempt to write
- it back out to disk you will destroy the original file.
-
- In many cases, non-DOS-ASCII files will cause the program to
- terminate during the file-read sequence because of the line-length
- limitation (see below).
-
- LINE LENGTH:
-
- Lines are limited to a maximum of 512 characters each. If this
- length is exceeded either while editing files or reading files into
- the buffer, error messages will be generated.
-
- COMMAND ABBREVIATIONS:
-
- For commands entered after the colon ":" you only need to enter
- enough letters to make the chosen command unique. For example,
- ":sh<cr>" is equivalent to ":shell<cr>", and ":up<cr>" is
- equivalent to ":upcase<cr>".
-
- GREETING-SCREEN PAUSE:
-
- Every time the program is started, Oak Hill Vi (TM) pauses and
- requires an explicit carriage-return to proceed beyond the greeting
- screen. You can remove the necessity for a carriage return by
- installing a ":set nopress<cr>" command in a VISETUP.VI file. See
- Sections 5 and 2.9. (The Registered version of Oak Hill Vi does
- not generate a pause.)
-
- INTERNAL ERRORS:
-
- If you receive a "Corrupted Pointer Structure -- Program Must
- Abort" message, and you have not received any warning messages
- about heap exhaustion, then you may have experienced an internal
- program error. Please contact Oak Hill Software if this happens,
- and supply all the information you can about how the error
- occurred, including any error messages you may have received at the
- time of the abort.
-
-
-
-
-
-
-
-
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 45
-
-
- 11.0 COMMAND INDEX AND QUICK REFERENCE
- =======================================================================
- Command Action Section
- ------- ------ -------
- A ....... append text at end of line ........................... 2.3
- B ....... back up one Word ..................................... 2.1
- C ....... change remainder of line ............................. 2.5
- D ....... delete remainder of line ............................. 2.4
- E ....... move to end of next Word.............................. 2.1
- F ....... Fx - find character x (reverse search) ............... 2.2
- G ....... jump to end of file (or specified line number) ....... 2.1
- H ....... jump to first complete line on screen ................ 2.1
- I ....... insert text at front of line ......................... 2.3
- J ....... join line below with current line .................... 2.7
- L ....... jump to last complete line on screen ................. 2.1
- M ....... jump to middle line on screen ........................ 2.1
- N ....... move backward to previous pattern match .............. 2.2
- O ....... open file for text above current line ................ 2.3
- P ....... put stored lines (string) above (before) cursor ...... 2.7
- R ....... replace (overstrike) text ............................ 2.7
- S ....... substitute text for current line ..................... 2.7
- T ....... tx find char following character x (reverse search)... 2.7
- W ....... move forward one Word ................................ 2.1
- X ....... delete previous character ............................ 2.7
- Y ....... yank one line ........................................ 2.6
- Z ....... ZZ - write out file and quite editor ................. 2.8
-
- a ....... append ............................................... 2.3
- b ....... move back one word ................................... 2.1
- c ....... change ............................................... 2.5
- d ....... delete ............................................... 2.4
- e ....... move to end of word .................................. 2.1
- f ....... fx find character x (forward search) ................. 2.2
- h ....... move left one character .............................. 2.1
- i ....... insert ............................................... 2.3
- j ....... move down one line ................................... 2.1
- k ....... move up one line ..................................... 2.1
- l ....... move right one character ............................. 2.1
- m ....... mark line/character position ......................... 2.9
- n ....... move forward to next pattern match ................... 2.2
- o ....... open file for new text below current line ............ 2.3
- p ....... put stored lines (string) below (after) cursor ....... 2.7
- r ....... replace single character ............................. 2.7
- s ....... substitute text for current character ................ 2.7
- t ....... tx find char preceding character x (forward search)... 2.2
- u ....... undo last text change ................................ 2.3
- v ....... print greeting message and version number ............ 2.9
- w ....... move forward to next word ............................ 2.1
- x ....... delete one character ................................. 2.7
- y ....... yank ................................................. 2.6
- z ....... redraw screen around current line .................... 2.2
-
- <ctl-B>.. move back one screenfull ............................. 2.1
- <ctl-D>.. scroll down 8 lines .................................. 2.1
- <ctl-E>.. scroll up one line maintaining cursor if possible .... 2.1
- <ctl-F>.. move forward one screenfull .......................... 2.1
- <ctl-H>.. backspace ............................................ 2.1,3
- <ctl-L>.. redraw screen ........................................ 2.9
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 46
-
-
- <ctl-U>.. scroll up 8 lines..................................... 2.1
- <ctl-V>.. accept next character literally ...................... 2.3
- <ctl-W>.. backspace over last word ............................. 2.3
- <ctl-Y>.. scroll down one line maintaining cursor if possible .. 2.1
-
- " ....... name buffer 'x' for yank, delete, or put command ..... 2.9
- $ ....... move to last character on line ....................... 2.1
- % ....... move to matching {}() character ....................... 2.1
- ' ....... go to first character of the line named 'x ........... 2.1
- ( ....... move to previous sentence ............................ 2.1
- ) ....... move to next sentence ................................ 2.1
- + ....... move to first character of following line ............ 2.1
- , ....... repeat last 'f' or 'F' command but reverse direction.. 2.2
- - ....... move to first non-white character of previous line ... 2.1
- . ....... repeat last command .................................. 2.3
- / ....... forward pattern search................................ 2.2
- 0 ....... move to first character on line ...................... 2.1
- ; ....... repeat last 'f' or 'F' command ....................... 2.2
- : ....... colon command series (see below) ..................... 2.7,8,9
- ? ....... reverse pattern search................................ 2.2
- ^ ....... move to first non-white character in line ............ 2.1
- ` ....... go to line and character named `x .................... 2.1
- ~ ....... reverse case of character ............................ 2.7
- ! ....... filter lines through external program ................ 2.9
-
-
- :! ...... escape to MS-DOS ..................................... 2.9
- :abbr ... abbreviate string1 by macroname while in input mode... 2.7
- :center.. center text .......................................... 2.9
- :clear .. clear buffers and count remaining heap ............... 2.9
- :d ...... delete lines ......................................... 2.7
- :e ...... edit another file .................................... 2.8
- :f ...... print file name, line number, total characters, etc. . 2.9
- :fill ... fill text ............................................ 2.9
- :fillp .. fill paragraph ....................................... 2.9
- :lowcase convert text to lower case............................ 2.9
- :map .... map single character into a command sequence.......... 2.9
- :m ...... move lines ........................................... 2.7
- :n ...... edit next file in sequence ........................... 2.1
- :p ...... print lines on screen ................................ 2.2,7
- :q ...... quit editor........................................... 2.8
- :r ...... read file from disk................................... 2.8
- :rfill .. reverse fill text .................................... 2.9
- :rfillp . reverse fill paragraph ............................... 2.9
- :s ...... substitute ........................................... 2.7
- :set .... set parameter (see below) ............................ 2.9
- :shell .. escape to MS-DOS ..................................... 2.9
- :heap ... measure remaining heap ............................... 2.9
- :t ...... transfer (copy) lines ................................ 2.7
- :upcase . convert text to upper case............................ 2.9
- :w ...... write buffer to disk.................................. 2.8
- :<n> .... move to line n ....................................... 2.1
-
- :set ai,noai ......... autoindent on/off (default noai) ........ 2.7
- :set aw,noaw ......... autowrite on/off (default aw) ........... 2.7
- :set beep,nobeep ..... computer speaker on/off (default on) .... 2.7
- :set colors .......... set foreground & background colors ...... 2.7
- :set ctr=n ........... set centering column (default n=40) ..... 2.7
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-
-
- OAK HILL VI (TM) SHAREWARE MANUAL - VERSION 5.7 -- Page 47
-
-
- :set cursor .......... set cursor to box or underscore ......... 2.7
- :set esc2='x'......... select additional escape character ...... 2.7
- :set ic,noic ......... ignore case on/off (default noic) ....... 2.7
- :set idm,noidm ....... print Input Mode message (default idm)... 2.7
- :set lines=n ......... screen size in lines .................... 2.7
- :set magic,nomagic ... meta character recognition on/off ....... 2.7
- :set nu,nonu ......... line number option on/off (default nonu). 2.7
- :set press,nopress ... greeting screen pause on/off (default on) 2.7
- :set rmar=n .......... right margin set (default n=75) ......... 2.7
- :set ts=n ............ set tab stops every n spaces ............ 2.7
- :set wm=n ............ wrap margin spaces (default n=0) ........ 2.7
- :set ws,nows ......... wrapscan on search on/off (default nows). 2.7
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- COPYRIGHT (C) OAK HILL SOFTWARE INC, MAY 25, 1991, ALL RIGHTS RESERVED
-
-